package org.hermes.core.util{
	import mx.core.Application;
	
	public class HTMLParameters{
		public static function getParameter(name:String):Object{
			var parameters:Object = Application.application.parameters;
			return parameters["BrokerURL"];
		}
		
		public static function getBrokerURL():String{
			var parameters:Object = Application.application.parameters;
			
			if( ! parameters.hasOwnProperty("BrokerURL")){
				throw new Error("É necessário informar a URL base que irá prover os serviços. Verifique se o parametro \"BrokerURL\" foi informado no \"FlashVars\".");
			}
			
			return parameters["BrokerURL"].toString();
		}
	}
}